<template>
  <div id="topSearch">
    <div class="search-box">
      <el-form :inline="true" :model="formInline" class="demo-form-inline">
        <el-form-item label="修改时间">
          <el-date-picker
            v-model="formInline.date"
            type="datetimerange"
            range-separator="至"
            start-placeholder="开始时间"
            end-placeholder="结束时间"
          ></el-date-picker>
        </el-form-item>
        <el-form-item label="编辑人">
          <el-select
            v-model="formInline.editer"
            placeholder="请选择"
          ></el-select>
        </el-form-item>
        <el-form-item label="权限状态">
          <el-select
            v-model="formInline.checkStatus"
            placeholder="请选择"
          ></el-select>
        </el-form-item>
        <el-form-item>
          <el-select v-model="formInline.checkContext" placeholder="请选择">
            <el-option
              v-for="item in statusList"
              :key="item.key"
              :label="item.key"
              :value="item.value"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item>
          <el-input v-model="input" placeholder="请输入">
            <el-select slot="prepend" v-model="value">
              <el-option
                v-for="item in otherList"
                :key="item.key"
                :label="item.key"
                :value="item.value"
              >
              </el-option>
            </el-select>
          </el-input>
        </el-form-item>
        <el-form-item class="s-btn">
          <el-button
            type="success"
            icon="el-icon-search"
            @click="toSearch"
          >
            查询
          </el-button>
          <el-button type="success" plain @click="reset">
            重置
          </el-button>
        </el-form-item>
      </el-form>
    </div>
  </div>
</template>

<script>
export default {
  name: 'topSearch',
  msg: '属性管理-顶部搜索',
  props: {
    formInline: {
      type: Object,
      default: function() {
        return {
          data: '', // 修改时间
          editer: '', // 编辑人
          checkStatus: '', // 权限状态
          checkContext: ''
        }
      }
    }
  },
  data() {
    return {
      value: '大鹏号',
      input: '',
      statusList: [
        // 用户状态
        { key: '全部', value: 0 },
        { key: '正常', value: 1 },
        { key: '停用', value: -1 }
      ],
      otherList: [{ key: '大鹏号', value: 0 }, { key: '其它号', value: 1 }]
    }
  },
  mounted() {},
  methods: {
    /* 搜索 */
    toSearch() {},
    /* 重置 */
    reset() {}
  }
}
</script>

<style lang="less">
#topSearch {
  .search-box {
    padding-left: 30px !important;
  }
}
</style>
